package alingrad.engine.src.gameobjects;

import alingrad.engine.src.core.TreeNode;

/**
 * An object related to the game.
 * @author alingrad
 *
 */
public abstract class GameObject extends TreeNode {
	/**
	 * The x coordinate of the object.
	 */
	public float x;

	/**
	 * The y coordinate of the object.
	 */
	public float y;

	/**
	 * Whether the object should still exist.
	 */
	public boolean isValid = true;

	/**
	 * Constructs an GameObject with default values.
	 */
	public GameObject() {
		x = 0;
		y = 0;
		isValid = true;
	}

	/**
	 * Method called when an object is destroyed.
	 */
	public abstract void destroy();
}
